/**
 * CActor网站常量定义
 */

// CActor性能指标常量
export const PERFORMANCE_METRICS = {
  THROUGHPUT: 20_000_000, // 20M+ 消息/秒
  ASK_PERFORMANCE: 649_350, // Ask模式性能 req/s
  ASK_LATENCY: 1_540, // Ask延迟 ns/req
  ACTOR_CLUSTER_SIZE: 1_000_000, // 100万Actor集群
  STREAM_PROCESSING: 5_000_000, // 500万元素/秒
  STATE_MACHINE_TRANSITIONS: 249_000, // 249K转换/秒
  TEST_COVERAGE: 99.7, // 99.7%测试通过率
  TOTAL_TESTS: 324, // 324个测试
} as const;

// 7层架构定义
export const ARCHITECTURE_LAYERS = [
  {
    id: 'api',
    name: 'API Layer',
    description: '统一用户接口',
    components: ['REST API', 'GraphQL', 'WebSocket', 'gRPC'],
    color: '#3B82F6',
  },
  {
    id: 'integration',
    name: 'Integration Layer',
    description: '企业级集成',
    components: ['监控集成', '日志聚合', '指标收集', '告警系统'],
    color: '#8B5CF6',
  },
  {
    id: 'distribution',
    name: 'Distribution Layer',
    description: '分布式能力',
    components: ['集群管理', '远程通信', '负载均衡', '故障转移'],
    color: '#06B6D4',
  },
  {
    id: 'patterns',
    name: 'Patterns Layer',
    description: '设计模式',
    components: ['监督策略', '状态机', '事件溯源', 'CQRS'],
    color: '#10B981',
  },
  {
    id: 'runtime',
    name: 'Runtime Layer',
    description: '运行时系统',
    components: ['调度器', '消息路由', '内存管理', '垃圾回收'],
    color: '#F59E0B',
  },
  {
    id: 'core',
    name: 'Core Layer',
    description: '核心抽象',
    components: ['Actor模型', '消息系统', '生命周期', '行为定义'],
    color: '#EF4444',
  },
  {
    id: 'foundation',
    name: 'Foundation Layer',
    description: '基础设施',
    components: ['并发原语', '网络I/O', '序列化', '时间管理'],
    color: '#6B7280',
  },
] as const;

// 金融解决方案常量
export const FINANCIAL_SOLUTIONS = {
  HIGH_FREQUENCY_TRADING: {
    id: 'hft',
    title: '高频交易系统',
    description: '超低延迟的高频交易解决方案',
    latency: '< 1ms',
    throughput: '20M+ msg/s',
  },
  DISTRIBUTED_LEDGER: {
    id: 'ledger',
    title: '分布式账本系统',
    description: '基于事件溯源的分布式账本',
    consistency: 'Strong',
    scalability: 'Horizontal',
  },
  REAL_TIME_PAYMENT: {
    id: 'payment',
    title: '实时支付处理',
    description: '高并发实时支付处理系统',
    processing: '实时',
    reliability: '99.99%',
  },
  INTELLIGENT_RISK_CONTROL: {
    id: 'risk',
    title: '智能风控系统',
    description: '基于AI的实时风险控制',
    detection: '毫秒级',
    accuracy: '> 95%',
  },
} as const;

// 导航菜单常量
export const NAVIGATION_ITEMS = [
  {
    title: '产品',
    href: '/product',
    description: '了解CActor的核心特性和技术优势',
    items: [
      {
        title: '核心特性',
        href: '/product/features',
        description: '7层架构、高性能、企业级特性',
      },
      {
        title: '性能基准',
        href: '/product/benchmarks',
        description: '详细的性能测试报告和对比',
      },
      {
        title: '技术架构',
        href: '/product/architecture',
        description: '深入的技术架构分析',
      },
    ],
  },
  {
    title: '金融解决方案',
    href: '/solutions',
    description: '专为金融行业设计的解决方案',
    items: [
      {
        title: '高频交易系统',
        href: '/solutions/high-frequency-trading',
        description: '微秒级延迟，百万TPS的交易系统',
      },
      {
        title: '分布式账本',
        href: '/solutions/distributed-ledger',
        description: '事件溯源和CQRS架构的账本系统',
      },
      {
        title: '实时支付处理',
        href: '/solutions/real-time-payment',
        description: '流处理架构的高性能支付系统',
      },
      {
        title: '智能风控系统',
        href: '/solutions/intelligent-risk-control',
        description: 'AI驱动的实时风险管理系统',
      },
    ],
  },
  {
    title: '文档',
    href: '/docs',
    description: '完整的开发文档和API参考',
    items: [
      {
        title: '快速开始',
        href: '/docs/getting-started',
        description: '5分钟上手CActor',
      },
      {
        title: 'API参考',
        href: '/docs/api',
        description: '完整的API文档',
      },
      {
        title: '金融场景指南',
        href: '/docs/financial-guide',
        description: '金融场景开发最佳实践',
      },
    ],
  },
  {
    title: '案例研究',
    href: '/cases',
    description: '真实的客户案例和成功故事',
  },
  {
    title: '社区',
    href: '/community',
    description: '加入CActor开发者社区',
  },
  {
    title: 'ROI计算器',
    href: '/roi',
    description: '计算投资回报率和业务价值',
  },
] as const;

// 响应式断点常量
export const BREAKPOINTS = {
  sm: '640px',
  md: '768px',
  lg: '1024px',
  xl: '1280px',
  '2xl': '1536px',
} as const;

// 动画配置常量
export const ANIMATIONS = {
  FAST: { duration: 0.2, easing: 'ease-out' },
  NORMAL: { duration: 0.3, easing: 'ease-in-out' },
  SLOW: { duration: 0.5, easing: 'ease-in-out' },
  BOUNCE: { duration: 0.6, easing: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)' },
} as const;

// 颜色主题常量
export const COLORS = {
  primary: {
    50: '#eff6ff',
    100: '#dbeafe',
    500: '#3b82f6',
    600: '#2563eb',
    900: '#1e3a8a',
  },
  success: {
    50: '#f0fdf4',
    100: '#dcfce7',
    500: '#22c55e',
    600: '#16a34a',
    900: '#14532d',
  },
  warning: {
    50: '#fffbeb',
    100: '#fef3c7',
    500: '#f59e0b',
    600: '#d97706',
    900: '#78350f',
  },
  error: {
    50: '#fef2f2',
    100: '#fee2e2',
    500: '#ef4444',
    600: '#dc2626',
    900: '#7f1d1d',
  },
} as const;

// 代码示例语言常量
export const CODE_LANGUAGES = {
  CANGJIE: 'cangjie',
  TYPESCRIPT: 'typescript',
  JSON: 'json',
  SHELL: 'shell',
} as const;

// 社交媒体链接常量
export const SOCIAL_LINKS = {
  GITHUB: 'https://github.com/cactor-framework',
  TWITTER: 'https://twitter.com/cactor_framework',
  DISCORD: 'https://discord.gg/cactor',
  LINKEDIN: 'https://linkedin.com/company/cactor',
} as const;

// SEO相关常量
export const SEO = {
  SITE_NAME: 'CActor - 高性能Actor系统',
  SITE_DESCRIPTION:
    'CActor是基于仓颉语言实现的高性能Actor系统，采用7层模块化架构，为金融行业提供超低延迟、高吞吐量的解决方案。',
  SITE_URL: 'https://cactor.dev',
  TWITTER_HANDLE: '@cactor_framework',
} as const;

// 错误消息常量
export const ERROR_MESSAGES = {
  NETWORK_ERROR: '网络连接错误，请检查网络设置',
  NOT_FOUND: '页面未找到',
  SERVER_ERROR: '服务器错误，请稍后重试',
  VALIDATION_ERROR: '输入数据验证失败',
} as const;
